package com.ag.zrt.dao;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.ag.bean.TbPlanStep;

public class TbPlanStepDAO extends com.ag.dao.TbPlanStepDAO {
	private static final Log log = LogFactory.getLog(TbPlanStepDAO.class);
	
	public List<TbPlanStep> findByProperty(String propertyName, Object value) {
		log.debug("finding TbPlanStep instance with property: " + propertyName
				+ ", value: " + value);
		try {
			String queryString = "from TbPlanStep as model where model."
					+ propertyName + "= ? and model.a = 1";
			System.out.println(queryString+" ------------------queryString-----------------------");
			return getHibernateTemplate().find(queryString, value);
		} catch (RuntimeException re) {
			log.error("find by property name failed", re);
			throw re;
		}
	}

}
